package com.xpert.action.board;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xpert.action.CommandAction;
import com.xpert.beans.Board;
import com.xpert.dao.BoardDao;

public class ModifyAction implements CommandAction {

    @Override
    public String requestProc(HttpServletRequest request,
	    HttpServletResponse response) throws Throwable {
	
	int idx = Integer.parseInt(request.getParameter("idx"));
	Board article = BoardDao.getInstance().modifyArticle(idx);

	request.setAttribute("article", article);
	String page = request.getParameter("page");
	request.setAttribute("page", page);
	
	return "modify.jsp";
    }

}
